<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
      
<ui:composition template="/restrito/template.xhtml">

<ui:define name="css">
	<style type="text/css">
		.tableHead {
			color: white;
			background-color: #08C; 
			font-weight: bold; 
			text-align: left
		}
		.label-coluna2 {
			margin-top: 5px;
			margin-bottom: 5px;
			margin-right: 10px;
			float: left;
			text-align: right;
		}
		.control-group-coluna2 {
			margin-bottom: 0px;
		}
	</style>
</ui:define>

<ui:define name="menu"><ui:include src="menu.xhtml"/></ui:define>

<ui:define name="corpo">
	<h:outputScript library="js" name="jquery.maskedinput-1.2.2.js" target="head" />
	<h:outputScript library="js" name="jquery.maskMoney.0.2.js" target="head" />
	<h:outputScript library="js" name="cadastrarcurriculo.js" target="head" />
	
<div class="container">
	<div class="container-fluid">
		<div class="row-fluid">
			<ui:include src="menulateralprofissional.xhtml" />

			<div class="span9">
				<ui:include src="../mensagem.xhtml"/>
			    <h:form id="f" styleClass="form-horizontal">
			    
			    	<fieldset>
			    	<legend>Formação Acadêmica/Titulação
			    		<a class="btn" style="float:right" href="#tips" id="btnFormFormacaoAcademica"
			    			onclick="jQuery('#btnFormFormacaoAcademica').hide();jQuery('#divFormFormacaoAcademica').show('slow');jQuery('#f\\:btnLimparResultValidacao').click();"><i class="icon-plus"></i> Adicionar</a>
			    		<h:commandLink id="btnLimparResultValidacao" style="display:none;">
			    			<a4j:ajax event="click" listener="#{cadastrarCurriculoMB.limparResultValidacao}" render="sucessoAddFormacaoAcademica"/>
			    		</h:commandLink>
			    	</legend>
		    		<br/>
			    	<div id="divFormFormacaoAcademica" style="display:none;">
			    		<h:inputHidden id="sucessoAddFormacaoAcademica" value="#{cadastrarCurriculoMB.sucessoAddFormacaoAcademica}" />
				        <div class="control-group">
				  			<h:outputLabel for="nivel" value="* Nível" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneMenu id="nivel" value="#{cadastrarCurriculoMB.formacaoAcademica.nivel}" required="true" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsNivelFormacao}"/>
								</h:selectOneMenu>
								<rich:message for="nivel" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divEmGraduacao" style="display:none">
				  			<h:outputLabel for="em" value="* Em" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneMenu id="em" value="#{cadastrarCurriculoMB.formacaoAcademica.em}" required="#{param['f:nivel'] == 'A'}" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsCursoGraduacao}" />
								</h:selectOneMenu>
								<rich:message for="em" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divEmOutros" style="display:none">
				  			<h:outputLabel for="emOutros" value="* Em" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="emOutros" value="#{cadastrarCurriculoMB.emOutros}" required="#{param['f:nivel'] != 'A' and param['f:nivel'] != 'G' and param['f:nivel'] != 'H'}" styleClass="input-xlarge" maxlength="50"/>
								<rich:message for="emOutros" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="idPais" value="* País" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="idPais" value="#{cadastrarCurriculoMB.formacaoAcademica.idPais}" required="true" styleClass="input-xlarge" >
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsPais}" />
				  				</h:selectOneMenu>
								<rich:message for="idPais" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divEstado" style="display:none">
				  			<h:outputLabel for="siglaUf" value="* Estado" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="siglaUf" value="#{cadastrarCurriculoMB.formacaoAcademica.siglaUf}" required="#{param['f:idPais'] == '36' and not empty param['f:btnAddFormacaoAcademica']}" styleClass="input-xlarge" >
				  					<a4j:ajax event="change" listener="#{cadastrarCurriculoMB.onchangeEstadoFormacaoAcademica}" render="codIbge"/>
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsUf}" />
				  				</h:selectOneMenu>
								<rich:message for="siglaUf" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidade" style="display:none">
				  			<h:outputLabel for="codIbge" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="codIbge" value="#{cadastrarCurriculoMB.formacaoAcademica.codIbge}" required="#{param['f:idPais'] == '36'}" styleClass="input-xlarge" >
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsMunicipio}" />
				  				</h:selectOneMenu>
								<rich:message for="codIbge" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidadeInter" style="display:none">
				  			<h:outputLabel for="cidade" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="cidade" value="#{cadastrarCurriculoMB.formacaoAcademica.cidade}" required="#{param['f:idPais'] != '36'}" styleClass="input-xlarge" maxlength="50"/>
								<rich:message for="cidade" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="instituicao" value="* Instituição" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="instituicao" value="#{cadastrarCurriculoMB.formacaoAcademica.instituicao}" required="true" styleClass="input-xlarge" maxlength="60"/>
								<rich:message for="instituicao" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="inicio" value="Período" styleClass="control-label"/>
				  			<div class="controls">
				  				<div class="control-group-coluna2">
					  				<span class="label-coluna2"> * Início </span>
									<h:inputText id="inicio" value="#{cadastrarCurriculoMB.formacaoAcademica.inicio}" required="true" style="width:60px;float:left;margin-right:15px;" maxlength="7"/>
									<rich:message for="inicio" ajaxRendered="true" />
									<rich:jQuery selector="#inicio" query="mask('99/9999')" />
									
					  				<span class="label-coluna2"> Conclusão </span>
									<h:inputText id="fim" value="#{cadastrarCurriculoMB.formacaoAcademica.fim}" style="width:60px;float:left;" maxlength="7"/>
									<rich:jQuery selector="#fim" query="mask('99/9999')" />
								</div>
								<br clear="all"/>
								<i style="font-size:11px;">Não preencha o campo Conclusão caso ainda não tenha concluído.</i>
				  			</div>
						</div>
						<div class="form-actions">
							<button type="button" class="btn" onclick="jQuery('#divFormFormacaoAcademica').hide('slow');jQuery('#btnFormFormacaoAcademica').show();">Cancelar</button>
							<button type="button" class="btn" id="btnLimparFormacaoAcademica" style="margin-left:5px;margin-right:3px;">Limpar</button>
					    	<a4j:commandButton id="btnAddFormacaoAcademica" action="#{cadastrarCurriculoMB.addFormacaoAcademica}" 
					    			value="Adicionar" style="margin-left:5px;" styleClass="btn btn-primary" render="pnFormacaoAcademica sucessoAddFormacaoAcademica" 
					    			execute="@this nivel em emOutros idPais siglaUf codIbge cidade instituicao inicio fim"
					    			oncomplete="hideDivFormFormacaoAcademica();"/>
						</div>
					</div>
			    	<a4j:outputPanel id="pnFormacaoAcademica">
				    	<ui:repeat var="fa" value="#{cadastrarCurriculoMB.lsFormacaoAcademica}" varStatus="i">
				    	<div>
							<table class="table table-condensed table-striped table-bordered">
							<thead>
							<tr>
								<th colspan="2" class="tableHead">
									#{fa.nivelFormatado} - #{fa.inicio} até <h:outputText value="#{fa.fim}" rendered="#{not empty fa.fim}" /><h:outputText value="hoje" rendered="#{empty fa.fim}" />
									<span style="float: right;">
										<a4j:commandButton value="excluir" action="#{cadastrarCurriculoMB.excluirFormacaoAcademica}" 
												render="pnFormacaoAcademica" execute="@this" styleClass="btn btn-mini">
											<f:param name="index" value="#{i.index}" />
										</a4j:commandButton>
									</span>
								</th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td>Em</td>
								<td>#{fa.emFormatado}</td>
							</tr>
							<tr>
								<td>Local</td>
								<td>#{fa.pais}, #{fa.cidade}</td>
							</tr>
							<tr>
								<td>Instituição</td>
								<td>#{fa.instituicao}</td>
							</tr>
			   				</tbody>
			   				</table>
			   			</div>
			   			</ui:repeat>
			    	</a4j:outputPanel>
					</fieldset>					
					
					
					
			    	<fieldset>
			    	<legend>Formação Complementar
			    		<a class="btn" style="float:right" href="#tips" id="btnFormFormacaoComplementar"
			    			onclick="jQuery('#btnFormFormacaoComplementar').hide();jQuery('#divFormFormacaoComplementar').show('slow');jQuery('#f\\:btnLimparResultValidacaoFc').click();"><i class="icon-plus"></i> Adicionar</a>
			    		<h:commandLink id="btnLimparResultValidacaoFc" style="display:none;">
			    			<a4j:ajax event="click" listener="#{cadastrarCurriculoMB.limparResultValidacaoFc}" render="sucessoAddFormacaoComplementar"/>
			    		</h:commandLink>
			    	</legend>
			    	<br/>
			    	<div id="divFormFormacaoComplementar" style="display:none;">
			    		<h:inputHidden id="sucessoAddFormacaoComplementar" value="#{cadastrarCurriculoMB.sucessoAddFormacaoComplementar}" />
				        <div class="control-group">
				  			<h:outputLabel for="idPaisFc" value="* País" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="idPaisFc" value="#{cadastrarCurriculoMB.formacaoComplementar.idPais}" required="true" styleClass="input-xlarge" >
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsPais}" />
				  				</h:selectOneMenu>
								<rich:message for="idPaisFc" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divEstadoFc" style="display:none">
				  			<h:outputLabel for="siglaUfFc" value="* Estado" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="siglaUfFc" value="#{cadastrarCurriculoMB.formacaoComplementar.siglaUf}" required="#{param['f:idPaisFc'] == '36' and not empty param['f:btnAddFormacaoComplementar']}" styleClass="input-xlarge" >
				  					<a4j:ajax event="change" listener="#{cadastrarCurriculoMB.onchangeEstadoFormacaoComplementar}" render="codIbgeFc"/>
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsUf}" />
				  				</h:selectOneMenu>
								<rich:message for="siglaUfFc" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidadeFc" style="display:none">
				  			<h:outputLabel for="codIbgeFc" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="codIbgeFc" value="#{cadastrarCurriculoMB.formacaoComplementar.codIbge}" required="#{param['f:idPaisFc'] == '36'}" styleClass="input-xlarge" >
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsMunicipioFc}" />
				  				</h:selectOneMenu>
								<rich:message for="codIbgeFc" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidadeInterFc" style="display:none">
				  			<h:outputLabel for="cidadeFc" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="cidadeFc" value="#{cadastrarCurriculoMB.formacaoComplementar.cidade}" required="#{param['f:idPaisFc'] != '36'}" styleClass="input-xlarge" maxlength="50"/>
								<rich:message for="cidadeFc" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="cursoFc" value="* Curso" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="cursoFc" value="#{cadastrarCurriculoMB.formacaoComplementar.curso}" required="true" styleClass="input-xlarge" maxlength="70"/>
								<rich:message for="cursoFc" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="instituicaoFc" value="* Instituição" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="instituicaoFc" value="#{cadastrarCurriculoMB.formacaoComplementar.instituicao}" required="true" styleClass="input-xlarge" maxlength="60"/>
								<rich:message for="instituicaoFc" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="inicioFc" value="Período" styleClass="control-label"/>
				  			<div class="controls">
				  				<span style="padding-top:5px"> * Início </span>
								<h:inputText id="inicioFc" value="#{cadastrarCurriculoMB.formacaoComplementar.inicio}" required="true" style="width: 60px;" maxlength="4"/>
								<rich:message for="inicioFc" ajaxRendered="true" />
								<rich:jQuery selector="#inicioFc" query="mask('9999')" />
								
				  				<span style="padding-top:5px"> Conclusão </span>
								<h:inputText id="fimFc" value="#{cadastrarCurriculoMB.formacaoComplementar.fim}" style="width: 60px;" maxlength="4"/>
								<rich:jQuery selector="#fimFc" query="mask('9999')" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="cargaHorariaFc" value="* Carga horária" styleClass="control-label"/>
				  			<div class="controls">
								<div class="input-prepend input-append">
									<h:inputText id="cargaHorariaFc" value="#{cadastrarCurriculoMB.formacaoComplementar.cargaHoraria}" required="true" style="width: 222px;" maxlength="4"/>
									<span class="add-on">horas</span>
								</div>
								<rich:message for="cargaHorariaFc" ajaxRendered="true" />
								<rich:jQuery selector="#cargaHorariaFc" query="maskMoney({showSymbol:false,length:3,precision:0})" />
				  			</div>
						</div>
						<div class="form-actions">
							<button type="button" class="btn" onclick="jQuery('#divFormFormacaoComplementar').hide('slow');jQuery('#btnFormFormacaoComplementar').show();">Cancelar</button>
					    	<a4j:commandButton id="btnAddFormacaoComplementar" action="#{cadastrarCurriculoMB.addFormacaoComplementar}" 
					    			value="Adicionar" style="margin-left:5px;" styleClass="btn btn-primary" render="pnFormacaoComplementar sucessoAddFormacaoComplementar" 
					    			execute="@this idPaisFc siglaUfFc codIbgeFc cidadeFc cursoFc instituicaoFc inicioFc fimFc cargaHorariaFc"
					    			oncomplete="hideDivFormFormacaoComplementar();"/>
						</div>
					</div>
			    	<a4j:outputPanel id="pnFormacaoComplementar">
				    	<ui:repeat var="fc" value="#{cadastrarCurriculoMB.lsFormacaoComplementar}" varStatus="i">
				    	<div>
							<table class="table table-condensed table-striped table-bordered">
							<thead>
							<tr>
								<th colspan="2" class="tableHead">
									#{fc.inicio} até <h:outputText value="#{fc.fim}" rendered="#{not empty fc.fim}" /><h:outputText value="hoje" rendered="#{empty fc.fim}" />
									- #{fc.cargaHoraria} horas
									<span style="float: right;">
										<a4j:commandButton value="excluir" action="#{cadastrarCurriculoMB.excluirFormacaoComplementar}" 
												render="pnFormacaoComplementar" execute="@this" styleClass="btn btn-mini">
											<f:param name="index" value="#{i.index}" />
										</a4j:commandButton>
									</span>
								</th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td>Local</td>
								<td>#{fc.pais}, #{fc.cidade}</td>
							</tr>
							<tr>
								<td>Curso</td>
								<td>#{fc.curso}</td>
							</tr>
							<tr>
								<td>Instituição</td>
								<td>#{fc.instituicao}</td>
							</tr>
			   				</tbody>
			   				</table>
			   			</div>
			   			</ui:repeat>
			    	</a4j:outputPanel>
					</fieldset>
					
			    	<fieldset>
			    	<legend>Participacação em Eventos
			    		<a class="btn" style="float:right" href="#tips" id="btnFormParticipacaoEvento"
			    			onclick="jQuery('#btnFormParticipacaoEvento').hide();jQuery('#divFormParticipacaoEvento').show('slow');"><i class="icon-plus"></i> Adicionar</a>
			    	</legend>
			    	<br/>
			    	<div id="divFormParticipacaoEvento" style="display:none;">
			    		<h:inputHidden id="sucessoAddParticipacaoEvento" value="#{cadastrarCurriculoMB.sucessoAddParticipacaoEvento}" />
				        <div class="control-group">
				  			<h:outputLabel for="eventoPe" value="* Evento" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneMenu id="eventoPe" value="#{cadastrarCurriculoMB.participacaoEvento.evento}" required="true" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsTipoEvento}"/>
								</h:selectOneMenu>
								<rich:message for="eventoPe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="portePe" value="* Porte" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneMenu id="portePe" value="#{cadastrarCurriculoMB.participacaoEvento.porte}" required="true" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsPorte}"/>
								</h:selectOneMenu>
								<rich:message for="portePe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="nomePe" value="* Nome" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="nomePe" value="#{cadastrarCurriculoMB.participacaoEvento.nome}" required="true" styleClass="input-xlarge" maxlength="70"/>
								<rich:message for="nomePe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="anoPe" value="* Data" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneMenu id="mesPe" value="#{cadastrarCurriculoMB.participacaoEvento.mes}" required="true" style="width: 62px;">
									<f:selectItems value="#{selectItemMB.lsMes}" />
								</h:selectOneMenu>
								<rich:message for="mesPe" ajaxRendered="true" />
								<h:selectOneMenu id="anoPe" value="#{cadastrarCurriculoMB.participacaoEvento.ano}" required="true" style="width: 65px;">
									<f:selectItems value="#{selectItemMB.lsAno}" />
								</h:selectOneMenu>
								<rich:message for="anoPe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="idPaisPe" value="* País" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="idPaisPe" value="#{cadastrarCurriculoMB.participacaoEvento.idPais}" required="true" styleClass="input-xlarge" >
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsPais}" />
				  				</h:selectOneMenu>
								<rich:message for="idPaisPe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divEstadoPe" style="display:none">
				  			<h:outputLabel for="siglaUfPe" value="* Estado" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="siglaUfPe" value="#{cadastrarCurriculoMB.participacaoEvento.siglaUf}" required="#{param['f:idPaisPe'] == '36' and not empty param['f:btnAddParticipacaoEvento']}" styleClass="input-xlarge" >
				  					<a4j:ajax event="change" listener="#{cadastrarCurriculoMB.onchangeEstadoParticipacaoEvento}" render="codIbgePe"/>
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsUf}" />
				  				</h:selectOneMenu>
								<rich:message for="siglaUfPe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidadePe" style="display:none">
				  			<h:outputLabel for="codIbgePe" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="codIbgePe" value="#{cadastrarCurriculoMB.participacaoEvento.codIbge}" required="#{param['f:idPaisPe'] == '36'}" styleClass="input-xlarge" >
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsMunicipioPe}" />
				  				</h:selectOneMenu>
								<rich:message for="codIbgePe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidadeInterPe" style="display:none">
				  			<h:outputLabel for="cidadePe" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="cidadePe" value="#{cadastrarCurriculoMB.participacaoEvento.cidade}" required="#{param['f:idPaisPe'] != '36'}" styleClass="input-xlarge" maxlength="50"/>
								<rich:message for="cidadePe" ajaxRendered="true" />
				  			</div>
						</div>
						<div class="form-actions">
							<button type="button" class="btn" onclick="jQuery('#divFormParticipacaoEvento').hide('slow');jQuery('#btnFormParticipacaoEvento').show();">Cancelar</button>
					    	<a4j:commandButton id="btnAddParticipacaoEvento" action="#{cadastrarCurriculoMB.addParticipacaoEvento}" 
					    			value="Adicionar" style="margin-left:5px;" styleClass="btn btn-primary" render="pnParticipacaoEvento sucessoAddParticipacaoEvento" 
					    			execute="@this eventoPe portePe nomePe mesPe anoPe idPaisPe siglaUfPe codIbgePe cidadePe"
					    			oncomplete="hideDivFormParticipacaoEvento();"/>
						</div>
					</div>
			    	<a4j:outputPanel id="pnParticipacaoEvento">
				    	<ui:repeat var="pe" value="#{cadastrarCurriculoMB.lsParticipacaoEvento}" varStatus="i">
				    	<div>
							<table class="table table-condensed table-striped table-bordered">
							<thead>
							<tr>
								<th colspan="2" class="tableHead">
									#{pe.eventoFormatado} #{pe.porteFormatado} - #{pe.mes}/#{pe.ano}
									<span style="float: right;">
										<a4j:commandButton value="excluir" action="#{cadastrarCurriculoMB.excluirParticipacaoEvento}" 
												render="pnParticipacaoEvento" execute="@this" styleClass="btn btn-mini">
											<f:param name="index" value="#{i.index}" />
										</a4j:commandButton>
									</span>
								</th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td>Nome</td>
								<td>#{pe.nome}</td>
							</tr>
							<tr>
								<td>Local</td>
								<td>#{pe.pais}, #{pe.cidade}</td>
							</tr>
			   				</tbody>
			   				</table>
			   			</div>
			   			</ui:repeat>
			    	</a4j:outputPanel>
					</fieldset>
					
					
			    	<fieldset>
			    	<legend>Esperiência profissional
			    		<a class="btn" style="float:right" href="#ancora" id="btnFormEsperienciaProfissional"
			    			onclick="jQuery('#btnFormEsperienciaProfissional').hide();jQuery('#divFormEsperienciaProfissional').show('slow');jQuery('#f\\:btnLimparResultValidacaoEp').click();"><i class="icon-plus"></i> Adicionar</a>
			    		<h:commandLink id="btnLimparResultValidacaoEp" style="display:none;">
			    			<a4j:ajax event="click" listener="#{cadastrarCurriculoMB.limparResultValidacaoEp}" render="sucessoAddEsperienciaProfissional"/>
			    		</h:commandLink>
			    	</legend>
			    	<br/>
			    	<div id="divFormEsperienciaProfissional" style="display:none;">
			    		<h:inputHidden id="sucessoAddEsperienciaProfissional" value="#{cadastrarCurriculoMB.sucessoAddEsperienciaProfissional}" />
				        <div class="control-group">
				  			<h:outputLabel for="funcaoEp" value="* Função" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="funcaoEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.funcao}" required="true" styleClass="input-xlarge" maxlength="40"/>
								<rich:message for="funcaoEp" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="inicioEp" value="Período" styleClass="control-label"/>
				  			<div class="controls">
				  				<div class="control-group-coluna2">
					  				<span class="label-coluna2"> * Início </span>
									<h:inputText id="inicioEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.inicio}" required="true" style="width:60px;float:left;margin-right:15px;"/>
									<rich:message for="inicioEp" ajaxRendered="true" />
									<rich:jQuery selector="#inicioEp" query="mask('99/9999')" />
									
					  				<span class="label-coluna2"> Conclusão </span>
									<h:inputText id="fimEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.fim}" style="width:60px;float:left"/>
									<rich:jQuery selector="#fimEp" query="mask('99/9999')" />
								</div>
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="estabelecimentoEp" value="* Estabelecimento" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="estabelecimentoEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.estabelecimento}" required="true" styleClass="input-xlarge" maxlength="60"/>
								<rich:message for="estabelecimentoEp" ajaxRendered="true" />
				  			</div>
						</div>
			        	<div class="control-group">
				  			<h:outputLabel for="idPaisEp" value="* País" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="idPaisEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.idPais}" required="true" styleClass="input-xlarge">
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsPais}" />
				  				</h:selectOneMenu>
								<rich:message for="idPaisEp" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divEstadoEp" style="display:none">
				  			<h:outputLabel for="siglaUfEp" value="* Estado" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="siglaUfEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.siglaUf}" required="#{param['f:idPaisEp'] == '36' and not empty param['f:btnAddEsperienciaProfissional']}" styleClass="input-xlarge" >
				  					<a4j:ajax event="change" listener="#{cadastrarCurriculoMB.onchangeEstadoEsperienciaProfissional}" render="codIbgeEp"/>
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsUf}" />
				  				</h:selectOneMenu>
								<rich:message for="siglaUfEp" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidadeEp" style="display:none">
				  			<h:outputLabel for="codIbgeEp" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
				  				<h:selectOneMenu id="codIbgeEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.codIbge}" required="#{param['f:idPaisEp'] == '36'}" styleClass="input-xlarge" >
				  					<f:selectItems value="#{cadastrarCurriculoMB.lsMunicipioEp}" />
				  				</h:selectOneMenu>
								<rich:message for="codIbgeEp" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group" id="divCidadeInterEp" style="display:none">
				  			<h:outputLabel for="cidadeEp" value="* Cidade" styleClass="control-label"/>
				  			<div class="controls">
								<h:inputText id="cidadeEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.cidade}" required="#{param['f:idPaisEp'] != '36'}" styleClass="input-xlarge" maxlength="50"/>
								<rich:message for="cidadeEp" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="gestorImediatoNomeEp" value="Gestor imediato" styleClass="control-label"/>
				  			<div class="controls">
				  				<div class="control-group-coluna2" style="margin-bottom:10px;">
				  					<span class="label-coluna2" style="width:60px;"> Nome </span>
									<h:inputText id="gestorImediatoNomeEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.gestorImediatoNome}" style="width:190px;" maxlength="70"/>
								</div>
				  				<div class="control-group-coluna2">
					  				<span class="label-coluna2" style="width:60px;"> Contato </span>
									<h:inputText id="gertorImediatoContatoEp" value="#{cadastrarCurriculoMB.esperienciaProfissional.gertorImediatoContato}" style="width:190px;" maxlength="50"/>
								</div>
				  			</div>
						</div>
						<div class="form-actions">
							<button type="button" class="btn" onclick="jQuery('#divFormEsperienciaProfissional').hide('slow');jQuery('#btnFormEsperienciaProfissional').show();">Cancelar</button>
					    	<a4j:commandButton id="btnAddEsperienciaProfissional" action="#{cadastrarCurriculoMB.addEsperienciaProfissional}" 
					    			value="Adicionar" style="margin-left:5px;" styleClass="btn btn-primary" render="pnEsperienciaProfissional sucessoAddEsperienciaProfissional" 
					    			execute="@this funcaoEp inicioEp estabelecimentoEp fimEp idPaisEp siglaUfEp codIbgeEp cidadeEp gestorImediatoNomeEp gertorImediatoContatoEp"
					    			oncomplete="hideDivFormEsperienciaProfissional();"/>
						</div>
					</div>
					<span id="ancora"></span>
			    	<a4j:outputPanel id="pnEsperienciaProfissional">
				    	<ui:repeat var="ep" value="#{cadastrarCurriculoMB.lsEsperienciaProfissional}" varStatus="i">
				    	<div>
							<table class="table table-condensed table-striped table-bordered">
							<thead>
							<tr>
								<th colspan="2" class="tableHead">
									#{ep.funcao} - #{ep.inicio} até <h:outputText value="#{ep.fim}" rendered="#{not empty ep.fim}" /><h:outputText value="hoje" rendered="#{empty ep.fim}" />
									<span style="float: right;">
										<a4j:commandButton value="excluir" action="#{cadastrarCurriculoMB.excluirEsperienciaProfissional}" 
												render="pnEsperienciaProfissional" execute="@this" styleClass="btn btn-mini">
											<f:param name="index" value="#{i.index}" />
										</a4j:commandButton>
									</span>
								</th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td>Local</td>
								<td>#{ep.estabelecimento} - #{ep.pais}, #{ep.cidade}</td>
							</tr>
							<tr>
								<td>Gestor imediato</td>
								<td>#{ep.gestorImediatoNome}, #{ep.gertorImediatoContato}</td>
							</tr>
			   				</tbody>
			   				</table>
			   			</div>
			   			</ui:repeat>
			    	</a4j:outputPanel>
					</fieldset>
					
					
			    	<fieldset>
			    	<legend>Língua Estrangeira
			    		<a class="btn" style="float:right" href="#ancora" id="btnFormLinguaEstrangeira"
			    			onclick="jQuery('#btnFormLinguaEstrangeira').hide();jQuery('#divFormLinguaEstrangeira').show('slow');"><i class="icon-plus"></i> Adicionar</a>
			    	</legend>
			    	<br/>
			    	<div id="divFormLinguaEstrangeira" style="display:none;">
			    		<h:inputHidden id="sucessoAddLinguaEstrangeira" value="#{cadastrarCurriculoMB.sucessoAddLinguaEstrangeira}" />
				        <div class="control-group">
				  			<h:outputLabel for="linguaLe" value="* Língua" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneMenu id="linguaLe" value="#{cadastrarCurriculoMB.linguaEstrangeira.lingua}" required="true" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsLinguaEstrangeira}"/>
								</h:selectOneMenu>
								<rich:message for="linguaLe" ajaxRendered="true" />
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="lerLe" value="Lê" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneRadio id="lerLe" value="#{cadastrarCurriculoMB.linguaEstrangeira.ler}" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsLinguaEstrangeiraNivel}"/>
								</h:selectOneRadio>
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="falaLe" value="Fala" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneRadio id="falaLe" value="#{cadastrarCurriculoMB.linguaEstrangeira.fala}" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsLinguaEstrangeiraNivel}"/>
								</h:selectOneRadio>
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="escreveLe" value="Escreve" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneRadio id="escreveLe" value="#{cadastrarCurriculoMB.linguaEstrangeira.escreve}" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsLinguaEstrangeiraNivel}"/>
								</h:selectOneRadio>
				  			</div>
						</div>
				        <div class="control-group">
				  			<h:outputLabel for="compreendeLe" value="Compreende" styleClass="control-label"/>
				  			<div class="controls">
								<h:selectOneRadio id="compreendeLe" value="#{cadastrarCurriculoMB.linguaEstrangeira.compreende}" styleClass="input-xlarge">
									<f:selectItems value="#{selectItemMB.lsLinguaEstrangeiraNivel}"/>
								</h:selectOneRadio>
				  			</div>
						</div>

						<div class="form-actions">
							<button type="button" class="btn" onclick="jQuery('#divFormLinguaEstrangeira').hide('slow');jQuery('#btnFormLinguaEstrangeira').show();">Cancelar</button>
					    	<a4j:commandButton id="btnAddLinguaEstrangeira" action="#{cadastrarCurriculoMB.addLinguaEstrangeira}" 
					    			value="Adicionar" style="margin-left:5px;" styleClass="btn btn-primary" render="pnLinguaEstrangeira sucessoAddLinguaEstrangeira" execute="@this linguaLe lerLe falaLe escreveLe compreendeLe"
					    			oncomplete="hideDivFormLinguaEstrangeira();"/>
						</div>
					</div>
			    	<a4j:outputPanel id="pnLinguaEstrangeira">
				    	<ui:repeat var="lea" value="#{cadastrarCurriculoMB.lsLinguaEstrangeira}" varStatus="i">
				    	<div>
							<table class="table table-condensed table-striped table-bordered">
							<thead>
							<tr>
								<th class="tableHead">
									#{lea.linguaFormatado}
									<span style="float: right;">
										<a4j:commandButton value="excluir" action="#{cadastrarCurriculoMB.excluirLinguaEstrangeira}" 
												render="pnLinguaEstrangeira" execute="@this" styleClass="btn btn-mini">
											<f:param name="index" value="#{i.index}" />
										</a4j:commandButton>
									</span>
								</th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td>#{lea.lerFormatado}, #{lea.falaFormatado}, #{lea.escreveFormatado}, #{lea.compreendeFormatado}</td>
							</tr>
			   				</tbody>
			   				</table>
			   			</div>
			   			</ui:repeat>
			    	</a4j:outputPanel>
					</fieldset>
					
					
			    	<fieldset>
			    	<legend>Outros Conhecimentos</legend>
			        <div class="control-group">
			  			<h:outputLabel value="Conhecimentos de informática" styleClass="control-label"/>
			  			<div class="controls">
			  				<h:outputLabel for="conhecimentoMsword" value="MS Word" style="display:inline; vertical-align:middle;"/>
							<h:selectBooleanCheckbox id="conhecimentoMsword" value="#{cadastrarCurriculoMB.conhecimentoMsword}" style="margin-left:8px;margin-bottom:3px;">
								<f:ajax event="change" execute="@this" listener="#{cadastrarCurriculoMB.onchangeConhecimentoMsword}" />
							</h:selectBooleanCheckbox>

			  				<h:outputLabel for="conhecimentoMsexcel" value="MS Excel" style="display:inline; vertical-align:middle;margin-left:13px;"/>
							<h:selectBooleanCheckbox id="conhecimentoMsexcel" value="#{cadastrarCurriculoMB.conhecimentoMsexcel}" style="margin-left:8px;margin-bottom:3px;">
								<f:ajax event="change" execute="@this" listener="#{cadastrarCurriculoMB.onchangeConhecimentoMsexcel}" />
							</h:selectBooleanCheckbox>
							
			  				<h:outputLabel for="conhecimentoMspowerpoint" value="MS PowerPoint" style="display:inline;vertical-align:middle;margin-left:13px;"/>
							<h:selectBooleanCheckbox id="conhecimentoMspowerpoint" value="#{cadastrarCurriculoMB.conhecimentoMspowerpoint}" style="margin-left:8px;margin-bottom:3px;">
								<f:ajax event="change" execute="@this" listener="#{cadastrarCurriculoMB.onchangeConhecimentoMspowerpoint}" />
							</h:selectBooleanCheckbox>
			  			</div>
					</div>
					</fieldset>
				</h:form>
			</div>
		</div>
	</div>
</div>
	<script type="text/javascript">
		jQuery('#1003').addClass('active');
		jQuery('#1003i').addClass('icon-white');
	</script>
</ui:define>
</ui:composition>
</html>
